package cn.geminis.warehouse.service.purchase.entity;

import cn.geminis.lowcode.annotation.CrudController;
import cn.geminis.lowcode.annotation.CrudRepository;
import cn.geminis.lowcode.annotation.QueryFilter;
import cn.geminis.lowcode.annotation.UuidEntity;
import cn.geminis.warehouse.service.basic.entity.ProductBatch;
import cn.geminis.warehouse.service.inventory.entity.Container;
import jakarta.persistence.Column;
import jakarta.persistence.ManyToOne;
import lombok.Getter;
import lombok.Setter;

/**
 * 入库验收问题明细
 */
@Getter
@Setter
@UuidEntity
@QueryFilter
@CrudRepository
@CrudController(save = false, delete = false)
public class PurchaseContainer {

    /**
     * 入库单
     */
    @ManyToOne(optional = false)
    private Purchase purchase;

    /**
     * 商品批次
     */
    @ManyToOne(optional = false)
    private ProductBatch productBatch;

    /**
     * 商品数量
     */
    @Column(nullable = false)
    private int amount;

    /**
     * 货架
     */
    @ManyToOne(optional = false)
    private Container container;

}
